public class TriangleArea {

    public double getTriangleArea(int[][] nums){
        int n=nums.length;
        double res=0;
        for(int i=0;i<n-2;i++){
            for(int j=i+1;j<n-1;j++){
                for (int k = j+1; k < n; k++) {
                    int[] postion1=nums[i];
                    int[] postion2=nums[j];
                    int[] postion3=nums[k];
                    int x1=postion1[0]; int y1=postion1[1];
                    int x2=postion2[0]; int y2=postion2[1];
                    int x3=postion3[0]; int y3=postion3[1];
                    res=Math.max(res,0.5*Math.abs(x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2)));
                }
            }
        }
        return res;
    }
}
